#! /bin/sh
# Purpose: Continue the theme of zapping spatially aliased data from
#	suplane, doing a more difficult case
WIDTH=420
HEIGHT=700
WIDTHOFF1=0
WIDTHOFF2=430
WIDTHOFF3=860
HEIGHTOFF=150

amps=1,0,0,1	# In this demo, we try to kill a reflector of given slope

###MODEL###
# We make some simple data with suplane.  Here, in units of
# trace/timesample the slopes are -1, 1, 2, so
# that again the steepest reflector is spatially aliased.
suplane dip1=-4 | sushw key=d2 a=0.016 >suplane.data

# Again, "fool the program" (see the sudipfilt self-doc)
# by using nominal units in sudipfilt.  The data is created with
# "physical" parameters of dt=4ms and (nominally) dx=d2=0.015km=15m:
dt=1
dx=1



# Plot the model 
suxwigb <suplane.data title="Data: 3 sloping reflectors--Use dt=dx=1" \
	windowtitle="Data" \
	label1="Samples" label2="Trace" f1=1 d1=1 f2=1 d2=1\
	wbox=$WIDTH hbox=$HEIGHT xbox=$WIDTHOFF1 ybox=$HEIGHTOFF &
 
# Look at the F-K spectrum; note crossing of transformed reflectors
suspecfk <suplane.data |
suxwigb title="F-K Spectrum of Data" \
	windowtitle="F-K" \
	label1="Frequency" label2="K"\
	wbox=$WIDTH hbox=$HEIGHT xbox=$WIDTHOFF2 ybox=$HEIGHTOFF &

# Zap steep reflector by biasing actual slope 2 to slope 0
slopes=1.5,1.75,2.25,2.5
bias=2.0
sudipfilt <suplane.data dt=$dt dx=$dx \
	 slopes=$slopes amps=$amps bias=$bias |
suxwigb title="slope=$slopes amps=$amps bias=$bias" \
	windowtitle="zap steep" \
	label1="Samples" label2="Trace" f1=1 d1=1 f2=1 d2=1\
	wbox=$WIDTH hbox=$HEIGHT xbox=$WIDTHOFF3 ybox=$HEIGHTOFF &

exit 0
